import React, { useState } from 'react';
import {Button, Input, Modal, Checkbox} from 'antd';
const { TextArea } = Input;
import Table from './Table'
import Form from './form'
const App = (props) => {
    const [isModalOpen, setIsModalOpen] = useState(false);
    const showModal = () => {
        setIsModalOpen(true);
    };

    const handleOk = () => {
        setIsModalOpen(false);
    };

    const handleCancel = () => {
        setIsModalOpen(false);
    };

    React.useImperativeHandle(props.onRef, () => {
        return {
            showModal: showModal,
        };
    });
    return (
        <>
            <Modal title="作废项目" width={1000} open={isModalOpen} onOk={handleOk} onCancel={handleCancel}>
                <div>
                    <Form />
                </div>

                <div>
                    <Table />
                </div>
                <div style={{marginTop: '8px'}}>
                    <Button>全选</Button>
                    <Button style={{marginLeft: '8px'}}>反选</Button>
                </div>
            </Modal>
        </>
    );
};

export default App;
